#include "StdAfx.h"
#include "DBTableBaseCL.h"

DBTableBaseCL::DBTableBaseCL(Database * pDataBase_)
:m_pDataBase(pDataBase_)
{
}

DBTableBaseCL::~DBTableBaseCL(void)
{
}

Database * DBTableBaseCL::GetDataBase()
{
	return m_pDataBase ;
}

void DBTableBaseCL::SetTableName(std::string tableName_) 
{
	m_tableName = tableName_ ;
}

std::string DBTableBaseCL::GetTableName()
{
	return m_tableName ;
}

std::string DBTableBaseCL::ToSafeStr(std::string str_)
{
	char temp[1024] ;

	sprintf(temp , "%s" , str_.c_str()) ;

	char * retStr = strchr(temp , ' ') ;
	if(retStr != NULL)
		(*retStr) = '\0' ;

	return std::string(temp) ;
}